home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / prog / gport1.zip / GPORT.DOC < prev    next >
Text File  |  1993-04-09  |  25KB  |  1,119 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                     Gport
  12.  
  13.                     C Language Game Port Library
  14.  
  15.                     Version 1.01
  16.  
  17.                     1 September 91
  18.  
  19.                     Copyright (c) 1991  Bri Productions
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.                                         1
  63.  
  64.  
  65.  
  66.         Table of Contents
  67.  
  68.  
  69.             Introduction
  70.  
  71.                     General Description.....................3
  72.  
  73.                     Disclaimer..............................3
  74.  
  75.                     Registration............................3
  76.  
  77.                     Contacting the Author...................3
  78.  
  79.                     A typedef...............................3
  80.  
  81.  
  82.             General Functions
  83.  
  84.                     Description.............................4
  85.  
  86.                     GamOpen.................................5
  87.  
  88.                     GamClose................................6
  89.  
  90.                     GamAxis.................................6
  91.  
  92.                     GamAxes.................................7
  93.  
  94.                     GamButton...............................8
  95.  
  96.  
  97.             Calibration Functions
  98.  
  99.                     Description............................10
  100.  
  101.                     GamRawAxis.............................11
  102.  
  103.                     GamCalAxis.............................12
  104.  
  105.                     GamCenter..............................13
  106.  
  107.  
  108.  
  109.             Appendix A - Things to Look Out For............15
  110.  
  111.             Appendix B - Joystick Calibration/Centering....16
  112.  
  113.             Appendix C - Registration Form.................18
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.                                         2
  125.  
  126.  
  127.  
  128.         General Description.
  129.  
  130.         Gport is a C language, high speed, high resolution game port
  131.         library for IBM and compatible computers. Gport is compatible
  132.         with most if not all DOS based C compilers.
  133.  
  134.  
  135.         Some of Gport's features are:
  136.  
  137.         ∙ Timer driven button monitor.
  138.         ∙ Optional joystick calibration.
  139.         ∙ Choice of REAL or MEAN centering modes.
  140.         ∙ Yields higher resolution on faster computers.
  141.         ∙ Constant axis scaling to approximately ±1000.
  142.         ∙ Written in assembly language for optimum speed and efficiency.
  143.  
  144.  
  145.         DISCLAIMER.
  146.  
  147.         Gport is provided AS IS. Bri Productions specifically disclaims
  148.         any and all warranties, expressed or implied, including fitness
  149.         for a particular purpose. Use this product at your own risk.
  150.  
  151.  
  152.         Registration.
  153.  
  154.         Gport is a user supported software product. Distribution of
  155.         this product, unaltered and without charge, is encouraged. If
  156.         you find this product useful, you are encouraged to register
  157.         your copy. This allows Bri Productions to continue to provide
  158.         and support low cost, high quality shareware.
  159.  
  160.         The registration fee is $25.00 US dollars and includes libraries
  161.         for small, medium, compact and large memory models and complete
  162.         source code. A registration form is provided in Appendix C.
  163.  
  164.  
  165.         Contacting the author.
  166.  
  167.         Bri Productions may be contacted by any of the following means:
  168.  
  169.         U.S. mail       -       Bri Productions
  170.                                 P.O.Box 7121
  171.                                 Fremont, CA 94537-7121
  172.         Phone           -       (510) 794-0616
  173.         CompuServe      -       76635,2246
  174.  
  175.         CompuServe is a trademark of CompuServe Inc.
  176.  
  177.  
  178.         A typedef.
  179.  
  180.         You will see the data type 'byte' throughout the Gport library.
  181.         This is a typedef defined in gport.h. Byte is an unsigned
  182.         character used for byte size values.
  183.  
  184.  
  185.  
  186.  
  187.                                         3
  188.  
  189.  
  190.  
  191.         General functions
  192.  
  193.         There are two functions that are required before other game
  194.         port functions can be called. They are GamOpen() and GamClose().
  195.         GamOpen() initializes the game port and installs an interrupt
  196.         handler for monitoring the buttons. GamClose() releases the
  197.         interrupt handler. Failing to call GamClose() prior to the
  198.         program's termination will most certainly cause an operating
  199.         system crash.
  200.  
  201.         GamAxis() and GamAxes() fetches the position(s) of one or
  202.         more joystick axes. A full up or right joystick returns a value
  203.         of approximately +1000 and full down or left returns a value of
  204.         approximately -1000. GamButton() fetches the status of the game
  205.         port's buttons. Information on a button pressed since the last
  206.         call to GamButton() as well as a presently pressed is available.
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.                                         4
  250.  
  251.  
  252.  
  253.         ----------------------------------------------------------------
  254.         GamOpen
  255.         ----------------------------------------------------------------
  256.  
  257.         Function
  258.  
  259.                 Initializes the game port and installs the interrupt
  260.                 handler.
  261.  
  262.  
  263.         Syntax
  264.  
  265.                 #include "gport.h"
  266.                 int GamOpen(void);
  267.  
  268.  
  269.         Remarks
  270.  
  271.                 GamOpen initializes the game port. If an axis is found to
  272.                 be valid, it's corresponding bit is set in the returned
  273.                 status word. After a call to GamOpen, a subsequent call
  274.                 to GamClose is required. Failure to do so will most
  275.                 definitely cause the operating system to crash.
  276.  
  277.  
  278.         Return Value
  279.  
  280.                 GamOpen returns a valid axis status word. The bits/values
  281.                 are defined as follows:
  282.  
  283.                         JAX_VAL  (0x1) - Joystick A, x axis valid
  284.                         JAY_VAL  (0x2) - Joystick A, y axis valid
  285.                         JA_VAL   (0x3) - Joystick A, both axes valid
  286.                         JBX_VAL  (0x4) - Joystick B, x axis valid
  287.                         JBY_VAL  (0x8) - Joystick B, y axis valid
  288.                         JB_VAL   (0xC) - Joystick B, both axes valid
  289.  
  290.  
  291.         See also
  292.  
  293.                 GamClose
  294.  
  295.  
  296.         Example
  297.  
  298.                 Attempt to open the game port and check Joystick A.
  299.  
  300.                 {
  301.                 int valid_axes;
  302.  
  303.                    valid_axes = GamOpen();
  304.                    if((valid_axis & JA_VAL) == JA_VAL)
  305.                    {
  306.                       ...Joystick A OK
  307.  
  308.                    }
  309.                 }
  310.  
  311.                                         5
  312.  
  313.  
  314.  
  315.         ----------------------------------------------------------------
  316.         GamClose
  317.         ----------------------------------------------------------------
  318.  
  319.         Function
  320.  
  321.                 Releases the interrupt handler.
  322.  
  323.  
  324.         Syntax
  325.  
  326.                 #include "gport.h"
  327.                 void GamClose(void);
  328.  
  329.  
  330.         Remarks
  331.  
  332.                 After a call to GamOpen, a subsequent call to GamClose
  333.                 is required. Failure to do so will most definitely cause
  334.                 the operating system to crash.
  335.  
  336.  
  337.         See also
  338.  
  339.                 GamOpen
  340.  
  341.  
  342.         Example
  343.  
  344.                 Close the game port prior to terminating.
  345.  
  346.                 {
  347.  
  348.                   ...closing code
  349.  
  350.                   GamClose();
  351.                   exit(0)
  352.  
  353.                 }
  354.  
  355.  
  356.  
  357.  
  358.         ----------------------------------------------------------------
  359.         GamAxis
  360.         ----------------------------------------------------------------
  361.  
  362.         Function
  363.  
  364.                 Gets the coordinate of a joystick axis.
  365.  
  366.  
  367.         Syntax
  368.  
  369.                 #include "gport.h"
  370.                 signed GamAxis(byte axis);
  371.  
  372.  
  373.                                         6
  374.  
  375.  
  376.  
  377.         Parameters
  378.  
  379.                 axis  - Constant that defines which axis to get the
  380.                         coordinate of. Possibilities are:
  381.  
  382.                            JAX  (0) - Joystick A, X axis
  383.                            JAY  (1) - Joystick A, Y axis
  384.                            JBX  (2) - Joystick B, X axis
  385.                            JBY  (3) - Joystick B, Y axis
  386.  
  387.  
  388.         Remarks
  389.  
  390.                 GamAxis fetches the coordinate of a single joystick
  391.                 axis. The coordinate is returned as a signed integer.
  392.  
  393.  
  394.         Return value
  395.  
  396.                 GamCoord returns the coordinate of the specified axis.
  397.                 The values will range from -1000 to +1000.
  398.  
  399.  
  400.         See also
  401.  
  402.                 GamAxes GamButton
  403.  
  404.  
  405.  
  406.  
  407.         Example
  408.  
  409.                 Update the current positions of the X & Y axes for
  410.                 joystick A.
  411.  
  412.  
  413.                 {
  414.  
  415.                    YourXaxisFunction( GamAxis(JAX) );
  416.                    YourYaxisFunction( GamAxis(JAY) );
  417.                 }
  418.  
  419.  
  420.  
  421.         ----------------------------------------------------------------
  422.         GamAxes
  423.         ----------------------------------------------------------------
  424.  
  425.         Function
  426.  
  427.                 Gets the both axes coordinates of a joystick.
  428.  
  429.  
  430.         Syntax
  431.  
  432.                 #include "gport.h"
  433.                 void GamAxes(byte stick, signed *x, signed *y);
  434.  
  435.                                         7
  436.  
  437.  
  438.  
  439.  
  440.  
  441.         Parameters
  442.  
  443.                 stick - Constant that defines which joystick to get
  444.                         the coordinates of. Possibilities are:
  445.  
  446.                            JA  (0) - Joystick A
  447.                            JB  (1) - Joystick B
  448.  
  449.                     x - pointer to the signed integer where the x axis
  450.                         coordinate will be stored.
  451.  
  452.                     y - pointer to the signed integer where the y axis
  453.                         coordinate will be stored.
  454.  
  455.  
  456.         Remarks
  457.  
  458.                 GamAxes fetches the coordinates of both axes for
  459.                 the specified joystick. The coordinates are stored
  460.                 at the pointers passed to GamAxes. The values will
  461.                 range from -1000 to +1000.
  462.  
  463.  
  464.  
  465.         See also
  466.  
  467.                 GamAxis GamButton
  468.  
  469.  
  470.         Example
  471.  
  472.                 Update the current positions of the X & Y axes for
  473.                 joystick A.
  474.  
  475.  
  476.                 {
  477.                 signed x,y;
  478.  
  479.                    GamAxes(JA, &x, &y);
  480.  
  481.                    YourXaxisFunction( x );
  482.                    YourYaxisFunction( y );
  483.                 }
  484.  
  485.  
  486.  
  487.         ----------------------------------------------------------------
  488.         GamButton
  489.         ----------------------------------------------------------------
  490.  
  491.         Function
  492.  
  493.                 Gets the status of the joystick buttons.
  494.  
  495.  
  496.  
  497.                                         8
  498.  
  499.  
  500.  
  501.         Syntax
  502.  
  503.                 #include "gport.h"
  504.                 byte GamButton(void);
  505.  
  506.  
  507.         Remarks
  508.  
  509.                 GamButton returns the current status of the joystick
  510.                 buttons as well as any button status since the last
  511.                 call to GamButton.
  512.  
  513.  
  514.         Return value
  515.  
  516.                 GamButton returns the status of the joystick buttons.
  517.                 If the button is currently pressed, it's current bit
  518.                 will be set. If a button has been pressed since the
  519.                 last call to GamButton, it's pending bit is set.
  520.                 The bit constants are as follows:
  521.  
  522.                   BA1_CURR (0x01) - Joystick A, button 1 current.
  523.                   BA2_CURR (0x02) - Joystick A, button 2 current.
  524.                   BB1_CURR (0x04) - Joystick B, button 1 current.
  525.                   BB2_CURR (0x08) - Joystick B, button 2 current.
  526.                   BA1_PEND (0x10) - Joystick A, button 1 pending.
  527.                   BA2_PEND (0x20) - Joystick A, button 2 pending.
  528.                   BB1_PEND (0x40) - Joystick B, button 1 pending.
  529.                   BB2_PEND (0x80) - Joystick B, button 2 pending.
  530.  
  531.  
  532.         See also
  533.  
  534.                 GamAxis GamAxes
  535.  
  536.  
  537.         Example
  538.  
  539.                 Check if the player has fired (button 1). If so
  540.                 call the fire update function.
  541.  
  542.                 #define FIRE  (BA1_PEND) | (BA1_CURR)
  543.  
  544.                 {
  545.  
  546.                    if(GamButton() & FIRE)
  547.                    {
  548.                       YourFireFunction();
  549.  
  550.                       ...more code
  551.                    }
  552.  
  553.                 }
  554.  
  555.  
  556.  
  557.  
  558.  
  559.                                         9
  560.  
  561.  
  562.  
  563.  
  564.         Calibration Functions
  565.  
  566.  
  567.         The performance of the joystick can be significantly improved
  568.         by calibrating it, especially if the joystick is misaligned.
  569.         This is achieved by collecting the raw value of the position of
  570.         the joystick extremes; full up, down, left, and right; and
  571.         recalculating scaling math. GamRawAxis() fetches the raw
  572.         value of the position of the joystick, which is passed to the
  573.         function GamCalAxis(). GamCalAxis() then recalculates the
  574.         scaling math.
  575.  
  576.         The calibration is done in two steps in order to leave open
  577.         the option of saving the raw values to disk for future
  578.         reference. This saves the step of having to recalibrate
  579.         every time a program is run.
  580.  
  581.         GamCenter() sets the centering mode. There are two ways to
  582.         determine where the center of a joystick is. The REAL center
  583.         is defined as where the joystick comes to rest. The MEAN
  584.         center is defined as the mean between the joystick extremes.
  585.  
  586.         For a more detailed description on calibration, see Appendix B.
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.                                         10
  622.  
  623.  
  624.  
  625.         ----------------------------------------------------------------
  626.         GamRawAxis
  627.         ----------------------------------------------------------------
  628.  
  629.         Function
  630.  
  631.                 Gets the raw value of a joystick axis.
  632.  
  633.  
  634.         Syntax
  635.  
  636.                 #include "gport.h"
  637.                 unsigned GamRawAxis(byte axis);
  638.  
  639.  
  640.         Parameters
  641.  
  642.                 axis  - Constant that defines which axis to get the
  643.                         coordinate of. Possibilities are:
  644.  
  645.                            JAX  (0) - Joystick A, X axis
  646.                            JAY  (1) - Joystick A, Y axis
  647.                            JBX  (2) - Joystick B, X axis
  648.                            JBY  (3) - Joystick B, Y axis
  649.  
  650.  
  651.         Remarks
  652.  
  653.                 GamRawAxis returns the raw value of a joystick position
  654.                 to be used for calibrating the joystick . Smaller values
  655.                 are to the left and up while larger values are to the
  656.                 right and down. The actual value will vary from machine
  657.                 to machine.
  658.  
  659.  
  660.         Return value
  661.  
  662.                 GamRawAxis returns the raw value for the position of
  663.                 the selected joystick axis.
  664.  
  665.  
  666.         See also
  667.  
  668.                 GamCal GamCenter
  669.  
  670.  
  671.         Example
  672.  
  673.                 Calibrate the X axis on joystick A.
  674.  
  675.                 {
  676.                 int raw_ax_right;
  677.                 int raw_ax_left;
  678.  
  679.  
  680.                    puts("Hold joystick full right and press any key");
  681.                    getch();
  682.  
  683.                                         11
  684.  
  685.  
  686.  
  687.                    raw_ax_right = GamRawAxis(JAX);
  688.                    GamCalAxis(JAX, raw_ax_left);
  689.  
  690.                    puts("Hold joystick full left and press any key");
  691.                    getch();
  692.                    raw_ax_left  = GamRawAxis(JAX);
  693.                    GamCalAxis(JAX, raw_ax_right);
  694.                 }
  695.  
  696.  
  697.  
  698.  
  699.         ----------------------------------------------------------------
  700.         GamCalAxis
  701.         ----------------------------------------------------------------
  702.  
  703.         Function
  704.  
  705.                 Calibrates a joystick axis extreme from a raw value.
  706.  
  707.  
  708.         Syntax
  709.  
  710.                 #include "gport.h"
  711.                 void GamCalAxis(byte axis, unsigned raw_value);
  712.  
  713.  
  714.         Parameters
  715.  
  716.                 axis  - Constant that defines which axis to get the
  717.                         coordinate of. Possibilities are:
  718.  
  719.                            JAX  (0) - Joystick A, X axis
  720.                            JAY  (1) - Joystick A, Y axis
  721.                            JBX  (2) - Joystick B, X axis
  722.                            JBY  (3) - Joystick B, Y axis
  723.  
  724.                 raw_value - Raw value returned from a call to GamRaw
  725.                         on which to calibrate.
  726.  
  727.  
  728.         Remarks
  729.  
  730.                 GamCalAxis calibrates a joystick extreme from a raw
  731.                 value from a previous call to GamRawAxis. Notice that
  732.                 it is not necessary to specify the extreme (left/right
  733.                 or up/down) in question.
  734.  
  735.  
  736.         See also
  737.  
  738.                 GamRawAxis GamCenter
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.                                         12
  746.  
  747.  
  748.  
  749.         Example
  750.  
  751.                 Calibrate the X axis on joystick A.
  752.  
  753.                 {
  754.  
  755.                    puts("Hold joystick full right and press any key");
  756.                    getch();
  757.                    GamCalAxis(JAX, GamRawAxis(JAX));
  758.  
  759.                    puts("Hold joystick full left and press any key");
  760.                    getch();
  761.                    GamCalAxis(JAX, GamRawAxis(JAX));
  762.                 }
  763.  
  764.  
  765.  
  766.         ----------------------------------------------------------------
  767.         GamCenter
  768.         ----------------------------------------------------------------
  769.  
  770.         Function
  771.  
  772.                 Sets the centering mode.
  773.  
  774.  
  775.         Syntax
  776.  
  777.                 #include "gport.h"
  778.                 void GamCenter(byte mode);
  779.  
  780.  
  781.         Parameters
  782.  
  783.                 mode - Constant defining the centering mode to be used.
  784.                        Possibilities are:
  785.  
  786.                        *  REAL (0) - real centering mode.
  787.                           MEAN (1) - mean value centering.
  788.  
  789.                           * default
  790.  
  791.         Remarks
  792.  
  793.                 GamCenter sets the centering mode to be used. In real
  794.                 mode, the center of an axis will be where the joystick
  795.                 is at rest. In mean mode, the center is calculated as
  796.                 the mean between the two previously calibrated extremes.
  797.                 For a more detailed description of the centering
  798.                 modes see Appendix B.
  799.  
  800.  
  801.         See also
  802.  
  803.                 GamRawAxis GamCalAxis
  804.  
  805.  
  806.  
  807.                                         13
  808.  
  809.  
  810.  
  811.         Example
  812.  
  813.                 Set the centering to mean mode.
  814.  
  815.                 {
  816.  
  817.                         GamCenter(MEAN);
  818.  
  819.                 }
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.                                         14
  870.  
  871.  
  872.  
  873.         Appendix A
  874.  
  875.  
  876.         Things to look out for.
  877.  
  878.         ∙ Gport installs a timer interrupt at interrupt 0x1C (user
  879.           timer link). Gport does not take over this interrupt but
  880.           chains into it.
  881.  
  882.         ∙ Some faster machines will exhibit a "fold back" on the down
  883.           and right strokes of the joystick. Special AT game ports
  884.           are available which usually resolve this problem.
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.                                         15
  932.  
  933.  
  934.  
  935.           Appendix B
  936.  
  937.  
  938.         Calibration
  939.  
  940.         When the function GamOpen() is called, some assumptions are made
  941.         about the raw values of the positions of the joystick extremes;
  942.         left, right, up and down. The assumptions are based on the raw
  943.         value of the joystick axes at the time of the call to  GamOpen()
  944.         (at rest at the center). In most cases the joystick will perform
  945.         reasonably well providing the alignment of the joystick is at
  946.         least fair.
  947.  
  948.         The performance of the joystick can be greatly improved if it
  949.         is calibrated. Even a poorly aligned joystick can be made to
  950.         appear to perform quite well. In order to accomplish this the
  951.         assumptions about the joystick extremes must be replaced by
  952.         their actual raw values. This requires the cooperation of the
  953.         user as well as the functions GamRawAxis() and GamCalAxis().
  954.  
  955.         Typically the user will be prompted to hold the joystick to
  956.         each of the four extremes and hit a key on the keyboard. For
  957.         each extreme, the raw value of the joystick position is read
  958.         by a call to GamRawAxis() and the returned value is passes to
  959.         GamCalAxis(). GamCalAxis will then make some recalculations
  960.         and replace the previous assumptions (or calibration).
  961.  
  962.         Notice that the calibration is done in two steps. First the
  963.         raw value is fetched and then it is passed. This allows the
  964.         program to store the raw values for future reference. Next
  965.         time the program is run, the values can be retrieved and
  966.         passes directly to GamCalAxis(). This saves the step of
  967.         having to interface with the user and calling GamRawAxis()
  968.         every time the program runs.
  969.  
  970.  
  971.  
  972.  
  973.         Centering
  974.  
  975.         There are two ways to interpret where the center of the
  976.         joystick is . One way is to define the center as being where
  977.         the joystick comes to rest. Gport port refers to this as REAL
  978.         mode. The second way is to define the center as being
  979.         equidistant, or at the mean, from all of the joystick extremes.
  980.         Gport refers to this centering mode as MEAN mode.
  981.  
  982.         REAL mode has the obvious advantage that the joystick will
  983.         always return approximately to the center. This will preclude
  984.         any drifting. The disadvantage of REAL mode is that there is
  985.         no evidence of how well the joystick is actually aligned.
  986.  
  987.         The advantage and disadvantage of MEAN mode is the complement
  988.         of those of REAL mode. Drift will occur if the joystick is
  989.         not aligned well. But since there will be the evidence of
  990.         the joystick's misalignment, MEAN mode could be used to
  991.         actually align a joystick.
  992.  
  993.                                         16
  994.  
  995.  
  996.  
  997.  
  998.         Recall that MEAN mode refers to the joystick extremes. Also
  999.         recall that the joystick extremes are assumed until the
  1000.         joystick is calibrated. For this reason there is little
  1001.         difference between the two centering modes until the joystick
  1002.         is calibrated. Calculating the mean center using the assumed
  1003.         extremes will result in the same center since the reverse
  1004.         process is used to calculate the assumed extremes.
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.                                         17
  1056.  
  1057.  
  1058.  
  1059.       Appendix C
  1060.  
  1061.  
  1062.         Gport Registration Form
  1063.  
  1064.         Name: ______________________________________________________
  1065.  
  1066.         Company: ___________________________________________________
  1067.  
  1068.         Address: ___________________________________________________
  1069.  
  1070.         City: ____________________________  State: _________________
  1071.  
  1072.         Zip code: _________________  Phone # : _____________________
  1073.  
  1074.         CompuServe # : _____________________________________________
  1075.  
  1076.         How did you acquire Gport ? _________________________________
  1077.  
  1078.         ____________________________________________________________
  1079.  
  1080.         What functions do you find most useful ?____________________
  1081.  
  1082.         ____________________________________________________________
  1083.  
  1084.         What functions do you find least useful ?___________________
  1085.  
  1086.         ____________________________________________________________
  1087.  
  1088.         What functions, not in Gport, would you like to see ?_______
  1089.  
  1090.         ____________________________________________________________
  1091.  
  1092.         What other types of libraries would you find useful ?_______
  1093.  
  1094.         __ Serial Communications  __ Expanded Memory  __ IEEE/GPIB
  1095.  
  1096.         Others: ____________________________________________________
  1097.  
  1098.         registration                                      $ 25.00
  1099.  
  1100.         California residents add sales tax (  8.25% )     $________
  1101.  
  1102.         shipping inside continental U.S.   ( $ 2.00 )
  1103.         shipping outside continental U.S.  ( $ 5.00 )     $________
  1104.  
  1105.  
  1106.                                                  Total:   $________
  1107.  
  1108.         All Payments Must be in U.S. Dollars
  1109.  
  1110.         Make check or money order payable to:    Bri Productions
  1111.                                                  P.O. Box 7121
  1112.                                                  Fremont, CA 94537-7121
  1113.  
  1114.  
  1115.  
  1116.  
  1117.                                         18
  1118. 
  1119.